package fjh.Interface;

public class BloodWarrior extends Warrior{

    public BloodWarrior(int experience,int blood)
    {
        super(experience,blood);
    }
    public BloodWarrior()
    {
        super();
    }
    public int injure(int x) {

        System.out.println("战士受伤了，减少"+x+"血量");
        this.setBlood(this.getBlood()-x);
        if(this.getBlood()<(MAX/2))
        {
            System.out.println("血量过低，危险***###");
        }
        if(this.getBlood()<0)
        {
            System.out.println("战士死翘翘了~~~~");
            System.exit(1);
        }
        return x;
    }
}
